import { CustomApp, CustomUI, Mock, WxApi } from '/engine/index';

CustomApp({
  towxml: require('/towxml/index'),
  appModules: [CustomUI, Mock, WxApi],
  uiModules: [],
  mock: {},
  async onLaunch() {
    const token = wx.getStorageSync('access_token');
    if (token) {
      wx.redirectTo({ url: '/pages/chat/index' });
      return;
    }
  },
  onShow() {},
  globalData: {
    userInfo: null,
  },
});
